# pip install huggingface_hub requests

from huggingface_hub import snapshot_download
import os

# 设置代理
os.environ["http_proxy"] = "http://127.0.0.1:7890"
os.environ["https_proxy"] = "http://127.0.0.1:7890"

# 下载模型到指定缓存路径
model_path = snapshot_download(
    repo_id="Qwen/Qwen3-Embedding-0.6B",
    cache_dir="D:\\fish\\huggingface_cache\\hub",
    resume_download=True,
    local_files_only=False
)

print(f"模型已下载到: {model_path}")